import { defineUserConfig } from 'vuepress'
import { path } from "@vuepress/utils";
import type { GungnirThemeOptions } from 'vuepress-theme-gungnir'
import { navbar } from './configs'

export default defineUserConfig<GungnirThemeOptions>({
  lang: 'zh-CN',
  title: 'baby李的空间',
  description: 'baby李的个人博客，一个正在努力的Java全栈工程师~分享编程学习经验，共同进步，互相学习，备战2025秋招~',
  templateDev: path.resolve(__dirname,'./template/index.build.html'),
  templateBuild: path.resolve(__dirname,'./template/index.build.html'),
  plugins: [
    [
      path.resolve(__dirname, '../../package/plugins/music-player/lib/node/index.js'),
      {

      }
    ]
  ],
  head: [
    [
      'link',
      {
        rel: 'icon',
        href: '/favicon.ico',
      },
    ],
    [
      'meta',
      {
        name: 'keywords',
        content: '与舟,baby李,与舟的学习空间,baby李的博客,withzhou,小李,李哥,Java,Spring,',
      },
    ],
  ],
  theme: 'gungnir',
  themeConfig: {
    logo: 'https://vuejs.org/images/logo.png',
    hitokoto: true,
    navbarTitle: 'baby李',
    personalInfo: {
      name: 'baby李',
      avatar: 'https://xingqiu-tuchuang-1256524210.cos.ap-shanghai.myqcloud.com/5378/blog-avatar.jpg',
      description: '正在努力的Java全栈工程师',
      sns: {
        github: 'BabyLy233',
        weibo: '6205970785',
        email: '2105451348@qq.com',
        bilibili: {
          icon: 'ri-bilibili-fill',
          link: 'https://space.bilibili.com/6466658',
        },
      },
    },
    homeHeaderImages: [
      {
        path: 'https://xingqiu-tuchuang-1256524210.cos.ap-shanghai.myqcloud.com/5378/wallhaven-3z8y59.png',
      },
      {
        path: 'https://xingqiu-tuchuang-1256524210.cos.ap-shanghai.myqcloud.com/5378/wallhaven-1ke35v.jpg',
      },
      {
        path: 'https://xingqiu-tuchuang-1256524210.cos.ap-shanghai.myqcloud.com/5378/wallhaven-8o1vv2.jpg',
      },
      {
        path: 'https://xingqiu-tuchuang-1256524210.cos.ap-shanghai.myqcloud.com/5378/wallhaven-3zev16.jpg',
      },
      {
        path: 'https://xingqiu-tuchuang-1256524210.cos.ap-shanghai.myqcloud.com/5378/wallhaven-3z8er9.jpg',
      },
      {
        path: 'https://xingqiu-tuchuang-1256524210.cos.ap-shanghai.myqcloud.com/5378/wallhaven-0jgexp.jpg',
      },
    ],
    // 标签页配置
    pages: {
      tags: {
        title: '标签',
        subtitle: '小李不擅长分类，加上tag已经很不错了...',
        bgImage: {
          path: 'https://xingqiu-tuchuang-1256524210.cos.ap-shanghai.myqcloud.com/5378/wallhaven-rdz9j1.png',
          mask: 'rgba(223,219,240,.5)',
        },
      },
      links: {
        title: '友链',
        subtitle: '让我看看朋友们在哪里呀😋',
        bgImage: {
          path: 'https://xingqiu-tuchuang-1256524210.cos.ap-shanghai.myqcloud.com/5378/wallhaven-zmzq3w.png',
          mask: 'rgba(223,219,240,.5)',
        },
      },
    },
    footer: `
      &copy; <a href="https://github.com/BabyLy233" target="_blank">baby李</a> 2022
      <br>
      <a href="https://beian.miit.gov.cn" target="_blank" rel="noopener noreferrer nofollow">苏ICP备2022010832号-1</a>
      <br>
      Powered by <a href="https://v2.vuepress.vuejs.org" target="_blank">VuePress</a> &
      <a href="https://github.com/Renovamen/vuepress-theme-gungnir" target="_blank">Gungnir</a>
    `,
    locales: {
      '/': {
        navbar: navbar.zh,
      },
    },
    searchText: '搜索',
    themePlugins: {
      giscus: {
        repo: 'BabyLy233/vuepress-giscus', // 必须，string，格式：user_name/repo_name
        repoId: 'R_kgDOHLgUNA', // 必须，string，在 Giscus 官网上生成
        category: 'Announcements', // 必须，string
        categoryId: 'DIC_kwDOHLgUNM4COlMT', // 必须，string，在 Giscus 官网上生成
        lang: 'zh-CN',
      },
      pwa: true,
    },
  },
})
